package com.itc.bi.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 大屏分类
 * @TableName big_screen_type
 */
@Data
@TableName(value ="big_screen_type")
@ApiModel("大屏分类")
public class BigScreenTypeEntity implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 父级目录id
     */
    @TableField("p_id")
    @ApiModelProperty(value = "父级目录id")
    private Long pid;

    /**
     * 名称
     */
    @ApiModelProperty("名称")
    @NotBlank(message = "名称不能为空")
    private String name;

    @ApiModelProperty("编码")
    @NotBlank(message = "编码不能为空")
    @TableField(value = "code")
    private String code;

    /**
     * 类型
     */
    @ApiModelProperty("类型")
    @NotBlank(message = "类型不能为空")
    private String type;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    @NotBlank(message = "排序不能为空")
    private Integer orderNum;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 创建人
     */
    @ApiModelProperty("创建人")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 更新人
     */
    @ApiModelProperty("更新人")
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "是否删除(1:删除，0:未删除)",hidden = true)
    @TableField(value = "is_deleted")
    @TableLogic
    private Integer isDeleted=0;
}